
using System;
using System.Collections.Generic;
namespace Paret
{
	
	
	public partial class PapersDialog : Gtk.Dialog
	{
		List<string> papers;
		Gtk.TreeViewColumn pathcolumn;
		Gtk.ListStore paperStore;
		
		public PapersDialog(List<string> papers)
		{
			this.Build();
			this.papers = papers;
			pathcolumn = new Gtk.TreeViewColumn();
			pathcolumn.Title = "Wallpapers";
			papersTreeView.AppendColumn(pathcolumn);
			
			paperStore = new Gtk.ListStore(typeof(String));
			papersTreeView.Model = paperStore;
			fillDialog();
			papersTreeView.Show();
		}
		
		private void fillDialog(){
			foreach (string pic in papers){
				paperStore.AppendValues(pic);
			}
			Gtk.CellRendererText paperCell = new Gtk.CellRendererText();
			pathcolumn.PackStart(paperCell,true);
			
			pathcolumn.AddAttribute(paperCell,"text",0);
		}

		protected virtual void OnPaperDialogOkClicked (object sender, System.EventArgs e)
		{
			this.Destroy();
		}
	}
}
